#ifndef DICOMVIEWER_H
#define DICOMVIEWER_H

#include <QWidget>
class ThumbnailBarWidget;
class ViewContainerWidget;
class QLocalServer;

namespace Ui {
class DicomViewer;
}

class DicomViewer : public QWidget
{
    Q_OBJECT

public:
    explicit DicomViewer(QWidget *parent = 0);
    ~DicomViewer();

    bool isServerListening() const;

private slots:
    void openDicomFolder();
    void openDicomFile();
    void openZipFile();
    void dicomSetup();
    void ftpSetup();
    void downloadFromPacs();
    void downloadFromFtp(const QStringList &dcms);
    void splitView();
    void on_fullScreenBtn_clicked(bool checked);
    void aboutThis();
    void onNewConnection();

    void drawLength();
    void drawAngle();
    void drawEllipse();
    void drawRectangle();
    void drawText();
    void drawPencil();

protected:
    void resizeEvent(QResizeEvent *e);
    bool eventFilter(QObject *watched, QEvent *event);

private:
    void setupToolBar();
    void setupConnection();
    void startLocalServer();
    void clearImageCache();

    Ui::DicomViewer *ui;
    QLocalServer *server;
};

#endif // DICOMVIEWER_H
